const self = foo(this);

declare module 'foo' {
  declare const aVar: string;
}

const time = 1000;
export class CC {
  public doWork(): void {
    console.info('work');
  }

  public init(): void {
    setTimeout(() => {
      this.doWork();
    }, time);
  }
}